package com.ruoqing.core.dto.user;

import com.ruoqing.core.enums.UserMessageEnum;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
	* @author YaoXian
	* @title: UserMessageDto
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 核心模块 - 用户服务 -
	*                消息队列发送异步可靠消息数据传输对象
	* @date 2020-12-03 19:04
	*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@Data
public class UserMessageDto {
		
		@XmlElement
		private UserResponse userResponse;
		
		@XmlElement
		private UserMessageEnum module;
		
		@XmlElement
		private Object param;
		
		public static UserMessageDto buildUserMessageDto(UserResponse userResponse,UserMessageEnum module){
				UserMessageDto userMessageDto = new UserMessageDto();
				userMessageDto.setModule(module);
				userMessageDto.setUserResponse(userResponse);
				return userMessageDto;
		}
}
